#define UCL_COMM 		8
#define UCL_GPRS_COMM    9
#define MIN_SIGNAL		12

#define GPRS_CHAR1		(char)22 // Jimmy - Added for gprs logo
#define NO_GPRS_CHAR1		(char)19 // Jimmy - Added for no gprs logo
#define NO_ANTENNA_CHAR1		(char)4  // Jimmy - Added for no signal logo

extern void vdInitializeUCLComm(COMM_OBJECT *obCommunication);
extern int inInitUCLCommunication (COMM_OBJECT *obCommunication);
extern int inBeginUCLCommunication(COMM_OBJECT *obCommunication, int inCPTIndex, VS_BOOL fUsePrimaryLine);
extern int inCheckUCLCommunication(COMM_OBJECT *obCommunication);
extern int inSendUCLCommunication(COMM_OBJECT *obCommunication, char *pchSendBuff, int inSendSize, VS_BOOL fConfirmSend, int inTimeout, long lnMessage);
extern int inReceiveUCLCommunication(COMM_OBJECT *obCommunication, char *pchReceiveBuff, int inReceiveSize, int inReceiveTimeout, long lnMessage);
extern int inEndUCLCommunication(COMM_OBJECT *obCommunication);
extern int inFlushUCLCommunication(void);
extern int inDeInitUCLCommunication(COMM_OBJECT *obCommunication);
//void vdInitializeUCLGPRSComm(COMM_OBJECT *obCommunication);
extern int inInitUCLGPRSCommunication (COMM_OBJECT *obCommunication);
extern int inBeginUCLGPRSCommunication(COMM_OBJECT *obCommunication, int inCPTIndex, VS_BOOL fUsePrimaryLine);
extern int inCheckUCLGPRSCommunication(COMM_OBJECT *obCommunication);
extern int inSendUCLGPRSCommunication(COMM_OBJECT *obCommunication, char *pchSendBuff, int inSendSize, VS_BOOL fConfirmSend, int inTimeout, long lnMessage);
extern int inReceiveUCLGPRSCommunication(COMM_OBJECT *obCommunication, char *pchReceiveBuff, int inReceiveSize, int inReceiveTimeout, long lnMessage);
extern int inEndUCLGPRSCommunication(COMM_OBJECT *obCommunication);
extern int inFlushUCLGPRSCommunication(void);
extern int inDeInitUCLGPRSCommunication(COMM_OBJECT *obCommunication);
extern int get_battery_status(void);
extern int get_battery_charge(void);
extern int get_dock_status(void);
extern int inGetHDTTotRecs(void);

void vdAddUCLFunctions( void );
int inUCLGPRSInitialize(void);

int SocketProgram(int BlockMode,VS_BOOL reconnect);
int Socket_Connect(unsigned char *port, unsigned char *hostip);
int inEditGPRSOperation(TRANSACTION_OBJECT *pobTran);
extern int inConfRecEdit(char *pchDataFileName);
int inCheckGPRSStatus(TRANSACTION_OBJECT *pobTran);
void vdGPRSDisplayWireless(int inSignalStatus, int inNetStatus, int inPDPContextStatus); // Frederick_L1 060304, change the prototype// Jimmy - Added display for GPRS signal.
int inCheckForceReboot(TRANSACTION_OBJECT * pobTran);// Frederick_L1 060704, check if terminal need to Reboot due to changes in GPRS config
int inResetForcereboot(TRANSACTION_OBJECT *pobTran);// Frederick_L1 060704, resets the ForceReboot during cold boot operation
int inNETSGPRSPrintFullReceipt(TRANSACTION_OBJECT* pobTran);  //Added by Anna Vida Garcia - For the NETS printing of error msgs
int inNETSReprintGPRSLastReceiptOperation(TRANSACTION_OBJECT *pobTran); //ANNAVIDS
int inReprintGPRSRcpt (long lnInvNum, PRINTER_OBJECT *obPrinter, TRANSACTION_OBJECT *pobTran, int inChoice); //ANNAVIDS

int inUCLETHInitialize(void);
//extern void vdInitializeUCLETHComm(COMM_OBJECT *obCommunication);
int inUCLETHInitialize(void);
int inInitUCLETHCommunication (COMM_OBJECT *obCommunication);
int inBeginUCLETHCommunication(COMM_OBJECT *obCommunication, int inCPTIndex, VS_BOOL fUsePrimaryLine);
int inCheckUCLETHCommunication(COMM_OBJECT *obCommunication);
int inSendUCLETHCommunication(COMM_OBJECT *obCommunication, char *pchSendBuff, int inSendSize, 
								VS_BOOL fConfirmSend, int inTimeout, long lnMessage);
int inReceiveUCLETHCommunication(COMM_OBJECT *obCommunication, char *pchReceiveBuff, int inReceiveSize, 
								 int inReceiveTimeout, long lnMessage);
int inEndUCLETHCommunication(COMM_OBJECT *obCommunication);
int inFlushUCLETHCommunication(void);
int inDeInitUCLETHCommunication(COMM_OBJECT *obCommunication);
int inSocketProgram(void);
int inSocketConnect(char *szHostIP);
int inUCLTerminate(void);
int inUCLTT0(void);
int  inGetUCLSignalStatus(void);
extern int inNETSPrintFullReceipt(TRANSACTION_OBJECT* pobTran);
int inPreConnection(void);
void vdSendRequest(unsigned char *szTransmitBuffer, unsigned int inSendSize);
void vdReceiveResponse(unsigned char *szReceiveBuffer, unsigned int inSendSize);
//qq extern int inPrintISOPacket(char szMessage[], unsigned char *pucMessage, int inLen);
int inPreconnectionRequest(void);//to check if preconnection is succesful
int inDisconnectionRequest(void);//to check if disconnection is succesful
int inCheckConnection(TRANSACTION_OBJECT *pobTran, short retTry);//to check if connected or not connected
int SocketProgramGPRS(int BlockMode);
void DisplayBatteryStatus(void);
int inEditMGTOperation(TRANSACTION_OBJECT *pobTran);

int inUCLInitialize(void);
// Added by KiaSoon 12122005 - Cater for WIFI Signal display
int inCheckWIFIStatus(TRANSACTION_OBJECT *pobTran);
void vdWIFIDisplayWireless(int inSignalStatus, int inNetStatus);
int inCheckUCLStatus(TRANSACTION_OBJECT *pobTran);